import request from '@/utils/request'

// 查询首页设置列表
export function listMainpage(query) {
  return request({
    url: '/sys/mainpage/list',
    method: 'get',
    params: query
  })
}

// 查询首页设置详细
export function getMainpage(id) {
  return request({
    url: '/sys/mainpage/' + id,
    method: 'get'
  })
}
// 查询首页video
export function getVideoUrl(id) {
  return request({
    url: '/sys/mainpage/video',
    method: 'get'
  })
}

// 新增首页设置
export function addMainpage(data) {
  return request({
    url: '/sys/mainpage',
    method: 'post',
    data: data
  })
}

// 修改首页设置
export function updateMainpage(data) {
  return request({
    url: '/sys/mainpage',
    method: 'put',
    data: data
  })
}

// 删除首页设置
export function delMainpage(id) {
  return request({
    url: '/sys/mainpage/' + id,
    method: 'delete'
  })
}

// 导出首页设置
export function exportMainpage(query) {
  return request({
    url: '/sys/mainpage/export',
    method: 'get',
    params: query
  })
}
